package com.abel.domain.types;

public enum HelpfulInfoStatus {

	YES ("Y", "Yes"),
	NO ("N", "No");
	
	private String statusCode;
	
	private String status;
	
	private HelpfulInfoStatus (String statusCode, String status) {
	
		this.statusCode = statusCode;
		this.status = status;
	}


	
	/**
	 * @return the statusCode
	 */
	public String getStatusCode() {
		return statusCode;
	}



	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}



	public static String getStatus(String statusCode) {
		
		if (statusCode != null) {
			
			for (HelpfulInfoStatus helpfulInfoStatus : HelpfulInfoStatus.values()) {
				
				if (helpfulInfoStatus.getStatusCode().equals(statusCode)) {
					return helpfulInfoStatus.getStatus();
				}
			}
		}
		return null;
	}

	
	public static String getStatusCode(String status) {
		
		if (status != null) {
			
			for (HelpfulInfoStatus helpfulInfoStatus : HelpfulInfoStatus.values()) {
				
				if (helpfulInfoStatus.getStatus().equals(status)) {
					return helpfulInfoStatus.getStatusCode();
				}
			}
		}
		return null;
	}
	
}
